From: Florian Müllner Date: Tue, 14 Mar 2017 19:32:50 +0000 (+0100) Subject: network: Close Wifi selection dialog when appropriate X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~426 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f97a3522e5267b891a57c0091725949efe5cab5c;p=gnome-shell.git network: Close Wifi selection dialog when appropriate Currently when the wifi selection dialog is open when the screen lock is activated, the dialog remains visible above the shield. This is clearly broken, so close the dialog automatically on session mode changes if the mode doesn't allow settings (as changing the access point is arguably a user setting). https://bugzilla.gnome.org/show_bug.cgi?id=780054 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index bedfc5e38..4f23fd3bc 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -769,6 +769,14 @@ const NMWirelessDialog = new Lang.Class({ this._scanTimeoutId = Mainloop.timeout_add_seconds(15, Lang.bind(this, this._onScanTimeout)); GLib.Source.set_name_by_id(this._scanTimeoutId, '[gnome-shell] this._onScanTimeout'); this._onScanTimeout(); + + let id = Main.sessionMode.connect('updated', () => { + if (Main.sessionMode.allowSettings) + return; + + Main.sessionMode.disconnect(id); + this.close(); + }); }, destroy: function() {